package com.shuhg.bean
{
	import com.adobe.serialization.json.JSON;
	
	import flash.utils.ByteArray;
	
	import flashx.textLayout.formats.Float;
	import flashx.textLayout.tlf_internal;

	/**
	 * 批注信息
	 * */
	public class Potil
	{
		//批注类型 1、点式批注  2、花纹批注  3、钢笔  4、铅笔  5、刷子
		private var _type:Number;
		//批注开始X轴
		private var _startX:Number;
		//批注开始Y轴
		private var _startY:Number;
		//批注结束X轴
		private var _width:Number;
		//批注结束Y轴
		private var _height:Number;
		//批注花纹样式(只有花纹批注才具有这一特效)
		private var _flowerStype:Number;
		//笔大小
		private var _penSize:Number;
		//笔颜色
		private var _penColor:Number;
		//笔透明值
		private var _penAlpha:Number;
		//批注内容
		private var _content:String;
		
		
		public function Potil(){
		}
		//
		public function set type(value:Number):void{
			this._type=value;
		}
		public function get type():Number{
			return _type;
		}
		//
		public function set startX(value:Number):void{
			this._startX=value;
		}
		public function get startX():Number{
			return _startX;
		}
		//
		public function set startY(value:Number):void{
			this._startY=value;
		}
		public function get startY():Number{
			return _startY;
		}
		//
		public function set width(value:Number):void{
			this._width=value;
		}
		public function get width():Number{
			return _width;
		}
		//
		public function set height(value:Number):void{
			this._height=value;
		}
		public function get height():Number{
			return _height;
		}
		//
		public function set flowerStype(value:Number):void{
			this._flowerStype=value;
		}
		public function get flowerStype():Number{
			return _flowerStype;
		}
		//
		public function set penSize(value:Number):void{
			this._penSize=value;
		}
		public function get penSize():Number{
			return _penSize;
		}
		//
		public function set penColor(value:Number):void{
			this._penColor=value;
		}
		public function get penColor():Number{
			return _penColor;
		}
		//
		public function set penAlpha(value:Number):void{
			this._penAlpha=value;
		}
		public function get penAlpha():Number{
			return _penAlpha;
		}
		//
		public function set content(value:String):void{
			this._content=value;
		}
		public function get content():String{
			return _content;
		}
		/**
		 * 点式批注
		 * */
		public function point(id:String,type:Number,startX:Number,startY:Number,content:String):String
		{
			this._type=type;
			this._startX=startX;
			this._startY=startY;
			this._content=content;
			return JSON.encode(this);
		}
		/**
		 * 花纹
		 * */
		public function flower(id:String,type:Number,startX:Number,startY:Number,
							   width:Number,height:Number,flowerStype:Number,content:String):String
		{
			this._type=type;
			this._startX=startX;
			this._startY=startY;
			this._width=width;
			this._height=height;
			this._flowerStype=flowerStype;
			this._content=content;
			return JSON.encode(this);
		}
		/**
		 * 钢笔、铅笔、刷子
		 * */
		public function pen(id:String,type:Number,startX:Number,startY:Number,width:Number,height:Number,
							penSize:Number,penColor:Number,penAlpha:Number,content:String):String
		{
			this._type=type;
			this._startX=startX;
			this._startY=startY;
			this._width=width;
			this._height=height;
			this._penSize=penSize;
			this._penColor=penColor;
			this._penAlpha=penAlpha;
			this._content=content;
			return JSON.encode(this);
		}
		
	}
}